package com.linkhub.oms.dao.mpservice.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.linkhub.oms.common.enums.mp.DataStatusEnum;
import com.linkhub.oms.dao.mapper.TemporaryCodeEntityMapper;
import com.linkhub.oms.dao.mpservice.ITemporaryCodeService;
import com.linkhub.oms.entity.TemporaryCodeEntity;
import org.springframework.stereotype.Service;

/**
 * @ClassName TemporaryCodeServiceImpl
 * @Description: com.linkhub.oms.dao.mpservice.impl
 * @Author: Jaycle
 * @CreateDate: 2025/5/26 15:53
 * @Version: 1.0
 */
@Service
public class TemporaryCodeServiceImpl extends ServiceImpl<TemporaryCodeEntityMapper, TemporaryCodeEntity> implements ITemporaryCodeService {
    @Override
    public TemporaryCodeEntity getByTemporaryCode( String temporaryCode ) {
        return lambdaQuery()
                .eq(TemporaryCodeEntity::getTemporaryCode, temporaryCode)
                .eq(TemporaryCodeEntity::getDataStatus, DataStatusEnum.ENABLE)
                .one();
    }
}
